#coding:utf-8
'''程序主函数,实现蓝图url映射'''

from flask import Flask


app = Flask(__name__)

@app.route('/')
def index():
    return 'main.py index page'

#todo 注册蓝图
from goods.views import goods  #导入的users为蓝图对象
app.register_blueprint(goods, url_prefix='/goods') #url_prefix就是指分配的url前缀

if __name__ == '__main__':
    print(app.url_map)
    app.run(debug=True)


